package Model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


@Table
@Entity
public class DetalleOrden {

	private int codDetalleOrden;
	private Product pro;
	private int cantidad;
	private double iva;
	private double monto;
	private Orden orden;

	public DetalleOrden() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Column
	@Id
	@GeneratedValue
	public int getCodDetalleOrden() {
		return codDetalleOrden;
	}

	@Column
	public void setCodDetalleOrden(int codDetalleOrden) {
		this.codDetalleOrden = codDetalleOrden;
	}

	@ManyToOne
	@JoinColumn(name = "codProducto")
	public Product getPro() {
		return pro;
	}

	@Column
	public void setPro(Product pro) {
		this.pro = pro;
	}

	@Column
	public int getCantidad() {
		return cantidad;
	}

	@Column
	public void setCantidad(int cantidad) {
		this.cantidad = cantidad;
	}

	@Column
	public double getIva() {
		return iva;
	}

	@Column
	public void setIva(double iva) {
		this.iva = iva;
	}

	@Column
	public double getMonto() {
		return monto;
	}

	@Column
	public void setMonto(double monto) {
		this.monto = monto;
	}

	@ManyToOne
	@JoinColumn(name = "codOrden")
	public Orden getOrden() {
		return orden;
	}

	public void setOrden(Orden orden) {
		this.orden = orden;
	}
}
